<!-- 边栏 -->
<aside id="search">
	<form name="searchform" class="toplevel" method="get" id="searchform" action="<?php $this->options->siteUrl(); ?>">
		<input type="text" class="field" name="s" id="s" value="Enter search keywords..." />
		<input type="submit" name="submit" class="button" value="Search" />
		<div class="clear"></div>
	</form>
</aside><!-- /#search -->
<aside id="tools">
	<div class="list">
		<h3>分类</h3>
		<ul>
			<?php $this->widget('Widget_Metas_Category_List@sidebar')->parse('<li class="cat-item"><a href="{permalink}">{name}</a> ({count})</li>'); ?>
			<?php if($this->user->hasLogin()): ?>
				<li class="cat-item"><a href="<?php $this->options->adminUrl(); ?>">进入后台</a>.</li>
				<li class="cat-item"><a href="<?php $this->options->logoutUrl(); ?>">退出</a>.</li>
			<?php else: ?>
				<li class="cat-item"><a href="<?php $this->options->adminUrl('login.php'); ?>">登录</a>.</li>
			<?php endif; ?>
		</ul>
	</div><!-- /.list -->
	<div class="list tags">
		<h3>读者墙</h3>
		<ul class="readers">
			
		</ul>
	</div><!-- /.list -->
	<div class="list last">
		<h3>站点信息</h3>
		<ul>
            <?php $this->need('include/statistics.php'); ?>
		</ul>
	</div><!-- /.list -->
	<div class="clear"></div>
</aside><!-- /#tools -->
 <?php if ($this->is('index')): ?> 
<aside id="links">
	<div class="list">
		<ul>
			<?php
				if(class_exists('Links_Plugin')){
					Links_Plugin::output(Null,0,NULL,0,1);	
				}  
			?>
		</ul>
	</div><!-- /.list -->
	<div class="clear"></div>
</aside><!-- /#links -->
<?php else:?>
<aside id="links" style="display:none;"></aside>
<?php endif;?>